home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / msysjour / vol06 / 05 / windos / makefile < prev    next >
Makefile  |  1991-09-01  |  2KB  |  57 lines

  1. # WINDOS makefile for Microsoft C NMAKE
  2. # see Microsoft Systems Journal, September 1991
  3. # andrew@pharlap.com
  4.  
  5. MODEL = S
  6.  
  7. LINK_FLAGS = /farc/packc/packd/nod/noe/align:16
  8.  
  9. .c.obj:
  10.     cl -G2sw -Oais -Zpe -W3 -A$(MODEL) -c -DWINDOWS $*.c
  11.  
  12. # WINDOS.LIB *must* come BEFORE standard MSC/SDK libraries:
  13.  
  14. .obj.exe:
  15.     link $(LINK_FLAGS) $*,$*,nul,$(MODEL)windos $(MODEL)libcew libw,winio.def
  16.     rc -t winio.res $*.exe
  17.  
  18. # RC -t marks this protected-mode only (won't run in Windows Real mode)
  19.  
  20. winio.res:  winio.rc
  21.     rc -r winio.rc
  22.  
  23. # NB!!!! YOU NEED THE LATEST VERSIONS OF WINIO AND WMHANDLR FOR THIS
  24. # THERE WERE SEVERAL CHANGES MADE SINCE THE JULY 1991 MSJ ARTICLE
  25.  
  26. $(MODEL)windos.lib:  winio.obj wmhandlr.obj argcargv.obj winheap.obj based.obj
  27.     lib $(MODEL)windos-+winio-+wmhandlr-+argcargv-+winheap-+based;
  28.  
  29. # -------------------------------------------------------------------
  30. # MEM_OLD uses the Microsoft version of _fmalloc, not WINDOS
  31. # just so we have a point of comparison
  32.  
  33. mem_old.exe:    mem.obj
  34.     link $(LINK_FLAGS) mem winio wmhandlr argcargv,mem_old,nul,slibcew libw,winio.def 
  35.     rc -t winio.res mem_old.exe 
  36.  
  37.  
  38. # -------------------------------------------------------------------
  39. # TESTLIST: test WINDOS using Richard Shaw's List Manager
  40. # from MSJ, September 1990
  41.  
  42. testlist.exe:   testlist.obj list.obj $(MODEL)windos.lib
  43.     link $(LINK_FLAGS) $* list,$*,nul,$(MODEL)windos $(MODEL)libcew libw,winio.def
  44.     rc -t winio.res $*.exe
  45.  
  46. # -------------------------------------------------------------------
  47.  
  48. hello2.exe:     hello2.obj $(MODEL)windos.lib
  49.  
  50. args.exe:       args.obj $(MODEL)windos.lib
  51.  
  52. cmdline.exe:    cmdline.obj $(MODEL)windos.lib
  53.  
  54. mem.exe:        mem.obj $(MODEL)windos.lib
  55.  
  56. ### other targets can be added here
  57.